<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\Schema;

class CreateEmployeeTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		//后台用户
		Schema::create('employee', function(Blueprint $table){
			$table->increments('id');
			$table->string('account', 30)->unique();
			$table->string('password', 60);
			$table->string('email', 30);
			$table->string('avatar',100)->nullable()->defaults('');	
			$table->string('phone', 20);
			$table->integer('company_id')->defaults(0);
			$table->smallInteger('status')->default(0);
			$table->rememberToken();
			$table->timestamps();
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::dropIfExists('employee');
	}

}
